<?php 
	session_start();
	
 	$index='index.php';

	if (!isset($_SESSION['login']))  {
	 header(sprintf("Location: %s",$index));
	 exit;
	}

?>
<html>
<head>
<title>CBTU/STU-JOP/GEPLA</title>

<script type="text/javascript">
function ligar_relogio(){
UR_Nu = new Date;
UR_Indhold = showFilled(UR_Nu.getHours()) + ":" + showFilled(UR_Nu.getMinutes()) + ":" + showFilled(UR_Nu.getSeconds());
document.getElementById("relogio").innerHTML = UR_Indhold;
setTimeout("ligar_relogio()",1000);
}
function showFilled(Value){return (Value > 9) ? "" + Value : "0" + Value;}
</script>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="styles.css" rel="stylesheet" type="text/css" />

	<script type='text/javascript' src='relojdhtml.js'></script>

</head>
<body>

<p align=center><img src="imagens/cbtu-stujop.png"/></p>

<table align="center" width="60%">
<tr><td align="left">Jo&atilde;o Pessoa/PB</td> <td align="right"><?php echo date("d/m/Y");?> <span><b><span id="relogio"><b></span><script>ligar_relogio();</script></span> </td></tr>
</table>
<hr />
<br />
<table width="85%" align="center" border="0">
<tr>                             
 <td><b>     
    <?php    
     $hr = date(" H ");               
     if($hr >= 12 && $hr<18) {        
     $resp = "boa tarde";}            
     else if ($hr >= 0 && $hr <12 ){  
     $resp = "bom dia";}
     else {
     $resp = "boa noite";}
     echo "$resp ";
?>
<? echo $_SESSION['login'];?> <br><br><h1>esta p&aacute;gina ainda est&aacute; em constru&ccedil;&atilde;o!</h1><br><a href='javascript:window.history.go(-1)'>clique aqui para voltar.</a>
</b> </td>
</tr>
</table>


</body>
</html>
